<?php
  App::import('Vendor', "charts");
  
  $chart [ 'chart_value' ] = array (  'prefix'         =>  $special, 
                                    'suffix'         =>  "", 
                                    'decimals'       =>  0,
                                    'decimal_char'   =>  ".",  
                                    'separator'      =>  "",
                                    'position'       =>  "above",
                                    'hide_zero'      =>  false, 
                                    'as_percentage'  =>  false, 
                                    'font'           =>  "Arial", 
                                    'bold'           =>  true, 
                                    'size'           =>  10, 
                                    'color'          =>  "000000", 
                                    'alpha'          =>  90
                                  );
	if ($special == '$') {
		$chart['chart_value']['decimals'] = 2;
	}
	if ($type == 'column') {
		$chart['chart_value']['position'] = 'outside';
		$chart['series_switch'] = true;
	}
	$chart['axis_category']['margin'] = true;
	//hide the legend
	$chart [ 'legend_rect' ] = array ( 'x'=>-1000 , 'y'=>-1000 );
	$chart['chart_type'] = $type;
	$chart['draw'] = array();
	$chart['draw'][] = array ( 'type'=>"text", 'color'=>"000000", 'alpha'=>50, 'font'=>"arial", 'rotation'=>-90, 'bold'=>true, 'size'=>30, 'x'=>-5, 'y'=>270, 'width'=>250, 'height'=>80, 'text'=>strtolower($pickups[0]), 'h_align'=>"center" );
	$chart['draw'][] = array ( 'type'=>"text", 'color'=>"000000", 'alpha'=>100, 'font'=>"arial", 'rotation'=>0, 'bold'=>true, 'size'=>12, 'x'=>100, 'y'=>280, 'width'=>250, 'height'=>80, 'text'=>'date', 'h_align'=>"center" );
	$data[0] = null;
	$chart['chart_data'] = array($pickups,$data);
	SendChartData($chart);
  //pr($chart);
?>
